package com.lt.member;

import java.util.concurrent.TimeUnit;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import code.lewdy.db.HibernateTemple;
import code.lewdy.time.TimeHelper;

/**
 * @author Administrator
 *前台开户最高返点，比如为8，则没有上级的会员A添加下级时可以设置的最高返点为8
 *返点差为1，A的下级B添加下级时可以设置的最高返点为7
 *后台添加的用户上级即是admin
 *上下级返点 收入 说明
ABC三个上下级  A返点5     B返点3  C返点0
C消费100元  C无返点收入    B收入3块  A收入2块
此层数可以设置N层 
 */
@Entity
@Table
public class MemberConfig {

	/**
	 * @param args
	 
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		MemberConfig mg = new MemberConfig();
		mg.setMaxFrontReturnPoint(8);
		mg.setReturnPointBase(6);
		mg.setTopReturnDistance(1);
		HibernateTemple.save(mg);
	}
	*/
	
	private int id;
	private double maxFrontReturnPoint; //前台开户最高返点
	private double topReturnDistance; //上下级返点差
	private double returnPointBase; //返点基数
	private int depositBeginTime; //提现开始时间,计秒数
	private int depositEndTime; //提现结束时间
	private int depositMaxCount; //最大提现次数
	private double depositMinAmount; //最小提现金额
	private double depositMaxAmount; //最大提现金额
	
	@Id
	@GeneratedValue
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public double getMaxFrontReturnPoint() {
		return maxFrontReturnPoint;
	}
	public void setMaxFrontReturnPoint(double maxFrontReturnPoint) {
		this.maxFrontReturnPoint = maxFrontReturnPoint;
	}
	public double getTopReturnDistance() {
		return topReturnDistance;
	}
	public void setTopReturnDistance(double topReturnDistance) {
		this.topReturnDistance = topReturnDistance;
	}
	public double getReturnPointBase() {
		return returnPointBase;
	}
	public void setReturnPointBase(double returnPointBase) {
		this.returnPointBase = returnPointBase;
	}
	public int getDepositBeginTime() {
		return depositBeginTime;
	}
	@Transient
	public String getDepositBeginTimeFormat(){
		return TimeHelper.turnSecondToHHMMSS(depositBeginTime);
	}
	public void setDepositBeginTime(int depositBeginTime) {
		this.depositBeginTime = depositBeginTime;
	}
	public int getDepositEndTime() {
		return depositEndTime;
	}
	@Transient
	public String getDepositEndTimeFormat(){
		return TimeHelper.turnSecondToHHMMSS(depositEndTime);
	}
	public void setDepositEndTime(int depositEndTime) {
		this.depositEndTime = depositEndTime;
	}
	public int getDepositMaxCount() {
		return depositMaxCount;
	}
	public void setDepositMaxCount(int depositMaxCount) {
		this.depositMaxCount = depositMaxCount;
	}
	public double getDepositMinAmount() {
		return depositMinAmount;
	}
	public void setDepositMinAmount(double depositMinAmount) {
		this.depositMinAmount = depositMinAmount;
	}
	public void setDepositMaxAmount(double depositMaxAmount) {
		this.depositMaxAmount = depositMaxAmount;
	}
	public double getDepositMaxAmount() {
		return depositMaxAmount;
	}
	
	

}
